import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const USER: AppRouteRecordRaw = {
  path: '/invoice',
  name: 'invoice',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '凭证管理',
    icon: 'icon-user',
    requiresAuth: true,
    order: 8,
  },
  children: [
    {
      path: 'm01',
      name: 'm01',
      component: () => import('@/views/invoice/index.vue'),
      meta: {
        locale: '费用类凭证规则',
        requiresAuth: true,
        roles: ['*'],
        parentId: 'invoice',
        type: 'COSTTYPE',
        typeName: '费用类凭证规则',
      },
    },
    {
      path: 'm02',
      name: 'm02',
      component: () => import('@/views/invoiceRead/index.vue'),
      meta: {
        locale: '查看/推送凭证',
        requiresAuth: true,
        roles: ['*'],
        parentId: 'invoice',
        type: 'COSTTYPE',
        typeName: '费用类凭证规则',
      },
    },
    {
      path: 'm04',
      name: 'm04',
      component: () => import('@/views/invoice/index.vue'),
      meta: {
        locale: '付款类凭证规则',
        requiresAuth: true,
        roles: ['*'],
        parentId: 'invoice',
        type: 'PAYTYPE',
        typeName: '付款类凭证规则',
      },
    },
    {
      path: 'm03',
      name: 'm03',
      component: () => import('@/views/assistComput/index.vue'),
      meta: {
        locale: '辅助核算项配置',
        requiresAuth: true,
        roles: ['*'],
        parentId: 'invoice',
      },
    },
  ],
};

export default USER;
